import Taro, { Component } from '@tarojs/taro'
import { View, Button, Text } from '@tarojs/components'
import { observer, inject } from '@tarojs/mobx'
import { AtTabs, AtTabsPane, AtIcon } from 'taro-ui'
import { PI } from '../../tool/number'
import * as tool from '../../tool/utils'
import './serviceManager.scss'


@inject('counterStore')
@observer
class ServiceManager extends Component {

    config = {
        navigationBarTitleText: '售后管理',
        navigationBarTextStyle: 'black',
        navigationBarBackgroundColor: '#FFF',
    }
    constructor() {
        super(...arguments)
        this.state = {
            current: 0,
        }
    }
    handleChange = (value) => {
        this.setState({
            value
        })
    }
    componentWillMount() {
        console.log('componentWillMount----');
        console.log(tool.title, tool.name, PI);
    }

    componentWillReact() {
        console.log('componentWillReact')
    }

    componentDidMount() { }

    componentWillUnmount() { }

    componentDidShow() { }
    handleClick(value) {
        this.setState({
            current: value
        })
    }
    componentDidHide() { }
    render() {
        const { counterStore: { counter } } = this.props
        const { icon } = this.state;
        const tabList = [{ title: '全部订单' }, { title: '审核中' }, { title: '审核通过' }, { title: '完结' }]
        return (
            <View className='serviceManager-page'>
                <AtTabs current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
                    <AtTabsPane current={this.state.current} index={0} >
                        <View className="order-box">
                            <View className="oder-header">
                                <View className="order-number">售后编号：2020392183921212</View>
                                <View className="order-status">退货</View>
                            </View>
                            <View className="shop-box">
                                <View className="shope-name">果果平价店</View>
                                <View className='types'>配送方式：商家配送</View>
                            </View>
                            <View className="goodsList">
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="type">拼团价</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="type">拼团价</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                            </View>
                            <View className="total"><View className="left">共2件商品</View><View className="right">合计：¥72.00</View></View>
                            <View className="contact">
                                <View>提货人：李晓明</View>
                                <View>联系方式：137****4348</View>
                            </View>
                            <View className="handle">
                                <View className="button">审核中</View>
                            </View>
                        </View>

                        <View className="order-box">
                            <View className="oder-header">
                                <View className="order-number">售后编号：2020392183921212</View>
                                <View className="order-status">退货</View>
                            </View>
                            <View className="shop-box">
                                <View className="shope-name">果果平价店</View>
                                <View className='types'>配送方式：商家配送</View>
                            </View>
                            <View className="goodsList">
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="type">拼团价</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="type">拼团价</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                            </View>
                            <View className="total"><View className="left">共2件商品</View><View className="right">合计：¥72.00</View></View>
                            <View className="contact">
                                <View>提货人：李晓明</View>
                                <View>联系方式：137****4348</View>
                            </View>
                            <View className="handle">
                                <View className="button">订单跟踪</View>
                                <View className="button">申请售后</View>
                            </View>
                        </View>
                    </AtTabsPane>
                    <AtTabsPane current={this.state.current} index={1}>
                        <View className="order-box">
                            <View className="oder-header">
                                <View className="order-number">售后编号：2020392183921212</View>
                                <View className="order-status">退货</View>
                            </View>
                            <View className="shop-box">
                                <View className="shope-name">果果平价店</View>
                                <View className='types'>配送方式：商家配送</View>
                            </View>
                            <View className="goodsList">
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="type">拼团价</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="type">拼团价</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                            </View>
                            <View className="total"><View className="left">共2件商品</View><View className="right">合计：¥72.00</View></View>
                            <View className="contact">
                                <View>提货人：李晓明</View>
                                <View>联系方式：137****4348</View>
                            </View>
                            <View className="handle">
                                <View className="button">审核中</View>
                            </View>
                        </View>

                        <View className="order-box">
                            <View className="oder-header">
                                <View className="order-number">售后编号：2020392183921212</View>
                                <View className="order-status">退货</View>
                            </View>
                            <View className="shop-box">
                                <View className="shope-name">果果平价店</View>
                                <View className='types'>配送方式：商家配送</View>
                            </View>
                            <View className="goodsList">
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="type">拼团价</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="type">拼团价</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                            </View>
                            <View className="total"><View className="left">共2件商品</View><View className="right">合计：¥72.00</View></View>
                            <View className="contact">
                                <View>提货人：李晓明</View>
                                <View>联系方式：137****4348</View>
                            </View>
                            <View className="handle">
                                <View className="button">订单跟踪</View>
                                <View className="button">申请售后</View>
                            </View>
                        </View>
                    </AtTabsPane>
                    <AtTabsPane current={this.state.current} index={2}>
                        <View className="order-box">
                            <View className="oder-header">
                                <View className="order-number">售后编号：2020392183921212</View>
                                <View className="order-status">退货</View>
                            </View>
                            <View className="shop-box">
                                <View className="shope-name">果果平价店</View>
                                <View className='types'>配送方式：商家配送</View>
                            </View>
                            <View className="goodsList">
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="type">拼团价</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="type">拼团价</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                            </View>
                            <View className="total"><View className="left">共2件商品</View><View className="right">合计：¥72.00</View></View>
                            <View className="contact">
                                <View>提货人：李晓明</View>
                                <View>联系方式：137****4348</View>
                            </View>
                            <View className="handle">
                                <View className="button">审核中</View>
                            </View>
                        </View>

                        <View className="order-box">
                            <View className="oder-header">
                                <View className="order-number">售后编号：2020392183921212</View>
                                <View className="order-status">退货</View>
                            </View>
                            <View className="shop-box">
                                <View className="shope-name">果果平价店</View>
                                <View className='types'>配送方式：商家配送</View>
                            </View>
                            <View className="goodsList">
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="type">拼团价</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="type">拼团价</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                            </View>
                            <View className="total"><View className="left">共2件商品</View><View className="right">合计：¥72.00</View></View>
                            <View className="contact">
                                <View>提货人：李晓明</View>
                                <View>联系方式：137****4348</View>
                            </View>
                            <View className="handle">
                                <View className="button">订单跟踪</View>
                                <View className="button">申请售后</View>
                            </View>
                        </View>
                    </AtTabsPane>
                    <AtTabsPane current={this.state.current} index={3}>
                        <View className="order-box">
                            <View className="oder-header">
                                <View className="order-number">售后编号：2020392183921212</View>
                                <View className="order-status">退货</View>
                            </View>
                            <View className="shop-box">
                                <View className="shope-name">果果平价店</View>
                                <View className='types'>配送方式：商家配送</View>
                            </View>
                            <View className="goodsList">
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="type">拼团价</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="type">拼团价</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                            </View>
                            <View className="total"><View className="left">共2件商品</View><View className="right">合计：¥72.00</View></View>
                            <View className="contact">
                                <View>提货人：李晓明</View>
                                <View>联系方式：137****4348</View>
                            </View>
                            <View className="handle">
                                <View className="button">审核中</View>
                            </View>
                        </View>

                        <View className="order-box">
                            <View className="oder-header">
                                <View className="order-number">售后编号：2020392183921212</View>
                                <View className="order-status">退货</View>
                            </View>
                            <View className="shop-box">
                                <View className="shope-name">果果平价店</View>
                                <View className='types'>配送方式：商家配送</View>
                            </View>
                            <View className="goodsList">
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="type">拼团价</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="type">拼团价</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                                <View className="item"><View className="name">哇哈哈AD钙奶*24整箱装</View><View className="price">¥36.00</View><View className="number">x1</View></View>
                            </View>
                            <View className="total"><View className="left">共2件商品</View><View className="right">合计：¥72.00</View></View>
                            <View className="contact">
                                <View>提货人：李晓明</View>
                                <View>联系方式：137****4348</View>
                            </View>
                            <View className="handle">
                                <View className="button">订单跟踪</View>
                                <View className="button">申请售后</View>
                            </View>
                        </View>
                    </AtTabsPane>
                </AtTabs>

            </View>
        )
    }
}

export default ServiceManager
